﻿get_filename_component(DAQ_SDK_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(DAQ_SDK_INCLUDE_DIRS "")
list(APPEND DAQ_SDK_INCLUDE_DIRS "${DAQ_SDK_PATH}/include")
list(APPEND DAQ_SDK_INCLUDE_DIRS "${DAQ_SDK_PATH}/include/third_party")

set(DAQ_SDK_LIBRARIES_DIR "")
list(APPEND DAQ_SDK_LIBRARIES_DIR "${DAQ_SDK_PATH}/lib")
if(WIN32)
  set(DAQ_SDK_VERSION "4.0.0")
  # 根据构建类型选择Debug或Release版本
  if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    set(BUILD_TYPE_DIR "Debug")
  else()
    set(BUILD_TYPE_DIR "Release")
  endif()
  
  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
    # 64位系统
    set(DAQ_SDK_DEPENDENT_LIBRARIES ${DAQ_SDK_LIBRARIES_DIR}/windows/x64/${BUILD_TYPE_DIR}/libdaq-${DAQ_SDK_VERSION}.lib)
  else()
    # 32位系统
    set(DAQ_SDK_DEPENDENT_LIBRARIES ${DAQ_SDK_LIBRARIES_DIR}/windows/x86/${BUILD_TYPE_DIR}/libdaq-${DAQ_SDK_VERSION}.lib)
  endif()
else(UNIX)
  set(DAQ_SDK_VERSION "3.10.4")
  set(DAQ_SDK_DEPENDENT_LIBRARIES ${DAQ_SDK_LIBRARIES_DIR}/linux/liblibdaq-${DAQ_SDK_VERSION}.so)
endif()

